<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<%@include file="/static/common/header.jsp"%>
		<%@include file="/static/common/easyui.jsp"%>
		<%@include file="/static/common/common.jsp"%>
		<link href="${ctx}/static/css/main.css" rel="stylesheet">
		<script src="${ctx}/static/jquery/jquery.form.js" type="text/javascript"></script>
		
		<script type="text/javascript">
		
		function dealOrder(status) {
// 			var order = {
// 					"id" : $("#orderId").val(),
// 					"dealRemark" : $("#dealRemark").val(),
// 					"status" : status
// 			};

// 			deal(order);
			$('#status').val(status);
			$('#orderDealForm').submit();
			progressing();
		}
		
		function deal(order) {
	        $.ajax({
				type: 'post',
				url : '${ctx}/infobird/call/dealOrder',
				data: JSON.stringify(order),
				contentType: "application/json; charset=utf-8",
				dataType : 'json',
				beforeSend:function(){
					$("body").mask("正在处理中...");
	    		},
				success: function(data) {
	    			$("body").unmask();
	    			if (data && data.success == "true") {
	   					//重新加载当前页
	    				$.messager.alert('提示','处理成功','info');
	        		} else {
	        			$.messager.alert('提示',data.err_msg,'info');
	        		}
				}
			});
		}
		
		$(document).ready(
			function() {
				$('#certType').combobox({
					disabled : true
				});

				$('#birth').datebox({
					disabled : true
				});
		})
		</script>
	</head>
	
	<body>
	
		<div id="J_Form">
		
			<form id="orderDealForm" name="orderDealForm" method="post" action="${ctx}/infobird/call/dealOrder">
				<!-- 隐藏域 -->
				<input type="hidden" id="custId" name="custId" value="${cust.id }">
				<input type="hidden" id="orderId" name="orderId" value="${order.id}">
				<input type="hidden" id="id" name="id" value="${order.id}">
				<input type="hidden" id="status" name="status" value="${order.status}">
				
			<!-- 客户类型选择 -->
			<table class="listTable">
				<tr>
					<th width="105px">客户类型：</th>
					<td width="1175px">
						<div class="fl">
							<input type="radio" name="custType" value="1" disabled="disabled"
								<c:if test="${cust.custType eq '1' }">checked="checked"</c:if> />
							服务机构&nbsp;&nbsp;&nbsp;&nbsp;
						</div>
						<div class="fl">
							<input type="radio" name="custType" value="2" disabled="disabled"
								<c:if test="${cust.custType eq '2' }">checked="checked"</c:if> />
							已开户客户&nbsp;&nbsp;&nbsp;&nbsp;
						</div>
						<div class="fl">
							<input type="radio" name="custType" value="3" disabled="disabled"
								<c:if test="${cust.custType eq '3' }">checked="checked"</c:if> />
							未开户客户&nbsp;&nbsp;&nbsp;&nbsp;
						</div>
						<div class="fl">
							<input type="radio" name="custType" value="4" disabled="disabled"
								<c:if test="${cust.custType eq '4' }">checked="checked"</c:if> />
							批发商&nbsp;&nbsp;&nbsp;&nbsp;
						</div>
						<div class="fl">
							<input type="radio" name="custType" value="5" disabled="disabled"
								<c:if test="${cust.custType eq '5' }">checked="checked"</c:if> />
							其他&nbsp;&nbsp;&nbsp;&nbsp;
						</div>
					</td>
				</tr>
			</table>

			<div style="height: 10px;"></div>

			<!-- 联系人信息 -->
			<table id="customerInfo" class="listTable" style="width: 100%">
				<caption>联系人信息</caption>
				<tbody>
					<tr>
						<th width="120px">姓名：</th>
						<td width="220px">
							<input type="text" id="name" name="name" value="${cust.name}" disabled="disabled">
						</td>
						<th width="120px">性别：</th>
						<td width="200px">
							<input type="radio" name="sex" value="M" disabled="disabled"
							<c:if test="${cust.sex eq 'M' }">checked="checked"</c:if> />
							男&nbsp;&nbsp;&nbsp;&nbsp; 
							<input type="radio" name="sex" value="F" disabled="disabled"
							<c:if test="${cust.sex eq 'F' }">checked="checked"</c:if> />
							女
						</td>
						<th width="120px">手机号码：</th>
						<td width="190px">
							<input type="text" id="mobile" name="mobile" value="${cust.mobile}" disabled="disabled"/>
						</td>
						<th width="120px">交易账号：</th>
						<td width="190px">
							<input type="text" id="acctNo" name="acctNo" value="${cust.acctNo}" disabled="disabled">
						</td>
					</tr>
					<tr>
						<th width="120px">证件号码：</th>
						<td width="220px">
							<select name="certType" id="certType" class="easyui-combobox">
								<c:forEach items="${dicList}" var="dic">
									<option value="${dic.dicValue}"
										<c:if test="${cust.certType eq dic.dicValue }">selected="selected"</c:if>>${dic.dicName}</option>
								</c:forEach>
							</select>
						 	-
						 	<input type="text" id="certNo" name="certNo" value="${cust.certNo}" disabled="disabled" style="width:140px;"/>
						</td>
						<th width="120px">出生日期：</th>
						<td width="200px">
							<input id="birth" name="birth" value="${cust.birthDay}" class="easyui-datebox"
								style="width: 150px;" />
						</td>
						<th width="120px">固定电话：</th>
						<td width="190px">
							<input type="hidden" id="telAbbr" name="abbr" value="${cust.telAbbr}" style="width: 50px;" />
							<input type="text" id="telephone" name="telephone" value="${cust.telephone}" disabled="disabled" />
						</td>
						<th width="120px">传真号码：</th>
						<td width="190px">
							<input type="hidden" id="faxAbbr" name="faxAbbr" value="${cust.faxAbbr}" style="width: 50px;" />
							<input type="text" id="fax" name="fax" value="${cust.fax}" disabled="disabled"/>
						</td>
					</tr>
					<tr>
						<th width="120px">号码归属地：</th>
						<td>
							<input type="hidden" id="province" name="province" value="${cust.province}">
							<input type="hidden" id="city" name="city" value="${cust.city}">
							<input type="text" id="dependency" name="dependency" value="${cust.dependency}" disabled="disabled">
						</td>
						<th width="120px">电子邮件：</th>
						<td width="150px">
							<input type="text" id="email" name="email" value="${cust.email}" disabled="disabled">
						</td>
						<th width="120px">通讯地址：</th>
						<td>
							<input type="text" id="address" name="address" value="${cust.address}" disabled="disabled">
						</td>

						<th width="120px">邮编：</th>
						<td>
							<input type="text" id="zipCode" name="zipCode" value="${cust.zipCode}" disabled="disabled">
						</td>
					</tr>
				</tbody>
			</table>

			<div class="height10"></div>
				
				<!-- 结算工单信息 -->
			<table id="customerInfo" class="listTable" style="width: 100%">
				<caption>业务信息</caption>
				<tbody>
					<tr>
						<th width="110px">业务类型：</th>
						<td width="300px">
							${order.businessFlow}
						</td>
						<th width="110px">交易账号：</th>
						<td width="300px">
							${order.acctNo}
						</td>
						<th width="110px">变更内容：</th>
						<td width="350px">
							${order.changeContent}
						</td>
					</tr>
					<tr>
						<th width="110px">附加信息：</th>
						<td colspan="5">
							${order.remark}
						</td>
					</tr>
					<tr>
						<th width="110px">消息推送：</th>
						<td colspan="5">
							短信(&nbsp;${order.smsFlagStr}&nbsp;)&nbsp;&nbsp;&nbsp;&nbsp;邮件(&nbsp;${order.emailFlagStr}&nbsp;)
						</td>
					</tr>
				</tbody>
			</table>
				
			<div class="height10"></div>
				
			<!-- 处理信息 -->
			<table id="dealInfo" class="listTable" style="width:100%">
				<tbody>
					<tr>
						<th width="105px">备注信息：</th>
						<td width="1175px">
							<c:if test="${opt eq 'VIEW' }">
								${order.dealRemark}
							</c:if>
							<c:if test="${opt eq 'DEAL' }">
								<textarea rows="3" cols="120" name="dealRemark" id="dealRemark" value=""></textarea>
							</c:if>
						</td>
					</tr>
				</tbody>
			</table>
				
			<div class="height10"></div>
				
			<div style="text-align:center;padding:5px;margin-top:5px;margin-bottom:5px;">
				<c:if test="${opt eq 'DEAL' }">
					<a href="javascript:void(0);" id="btn-back" onclick="dealOrder('1');" class="easyui-linkbutton" iconCls="icon-back">退回工单</a>&nbsp;&nbsp;&nbsp;&nbsp;
					<a href="javascript:void(0);" id="btn-add" onclick="dealOrder('2');" class="easyui-linkbutton" iconCls="icon-ok">完成处理</a>
				</c:if>
					
			</div>
				
			</form>
			
		
		</div>
		
		

	
	</body>

</html>